﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="list.aspx.cs" Inherits="admin_news_list" %>

<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <title>文章列表</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link href="http://cdnjs.bootcss.com/ajax/libs/twitter-bootstrap/2.3.1/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <script src="http://code.jquery.com/jquery-1.7.2.min.js" type="text/javascript"></script>
        <script src="http://cdnjs.bootcss.com/ajax/libs/twitter-bootstrap/2.3.1/js/bootstrap.min.js" type="text/javascript"></script>
    </head>
    <body>
        <div class="container-fluid">
            <div class="row-fluid">
                <form id="Form1" runat="server" class="form-search">
                <div class="span12">
                    <div class="alert">文章列表<asp:Button ID="btnAdd" runat="server" Text="新增" CssClass="btn btn-primary" onclick="btnAdd_Click" /></div>
                        
                    <asp:TextBox runat="server" ID="txtKey" CssClass="input-medium search-query" Text="" />
                    <%--<asp:Button ID="btnSearch" runat="server" CssClass="btn" Text="查询" onclick="btnSearch_Click" />--%>
                        
                    <table class="table table-bordered table-hover">
                        <thead>
                            <tr>
                            <th>标题</th>
                            <th>类别</th>
                            <th>发布时间</th>
                            <th></th>
                            </tr>
                        </thead>
                        <asp:Repeater runat="server" ID="rpt" onitemcommand="rpt_ItemCommand">
                            <ItemTemplate>
                                <tr>
                                    <td><a href='edit.aspx?id=<%# Eval("ID") %>'><%# Eval("Title") %></a></td>
                                    <td><%# Eval("Type.Name") %></td>
                                    <td><%# Eval("CreateDate") %></td>
                                    <td>
                                        <asp:Button ID="Button1" runat="server" OnClientClick="return confirm('确定删除吗?')" CssClass="btn" Text="删除" CommandArgument='<%# Eval("ID") %>' CommandName="DoDelete" />
                                        <a target="_blank" href='/aspx/NewsView.aspx?id=<%# Eval("ID") %>' class="btn">浏览</a>
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </table>  
                    </div>
                    </form>
            </div>
        </div>
        <div class="form-actions">
            <div class="pagination">
                <ul>
                    <%= PagerHtml %>
                </ul>
            </div>
        </div>
    </body>
</html>
